StoredLearningSession.MoveToNext Method

Moves to the next activity in the session. For a session that represents an active attempt, this is determined through sequencing rules of the package and the progress of the learner through it. In other views, this returns the next activity in a preorder traversal of the activity tree.

Parent Type: StoredLearningSession

Namespace: Microsoft.LearningComponents.Storage

Assembly: Microsoft.LearningComponents.Storage.dll

Syntax
C#

public override void MoveToNext ()

Exceptions
Exception type Condition
InvalidOperationException

Thrown if there is no current activity in the session or if the session is not in a state that allows moving to the next activity.

SequencingException

Thrown if a new activity could not be identified for delivery.

Remarks

For a SessionView of Execute, this method requires a current activity in the session.

Use IsMoveToNextValid to determine if an activity will identified as the current activity after calling this method.

In the process of navigation, the current activity may be exited before the navigation command is able to complete. If the navigation command then throws a SequencingException, the state of the session is undefined. The current activity may have changed during this process.

This method changes the state of the session. In order to save those changes in long-term storage, CommitChanges must be called after this method, and before the StoredLearningSession object is disposed. See the CommitChanges documentation for a further explanation of how to optimize performance while ensuring session changes are properly saved to LearningStore.